<div class="container">
  <div class="title-desc">
      <h2>Settings</h2>
    <span>Manage setting that is applied to entire application</span>
  </div>
  <app-loading-spinner *ngIf="loading"></app-loading-spinner>
  <form [formGroup]="form" (submit)="onSubmit()" *ngIf="!loading">
    <app-setting-field *ngFor="let applicationSetting of applicationSettings" [applicationSetting]="applicationSetting" [form]="form">
    </app-setting-field>
    <div class="action-buttons">
        <button mat-raised-button cdkFocusInitial *ngIf="!editing" (click)="onEditClick()">Edit</button>
        <button mat-raised-button color="primary" cdkFocusInitial *ngIf="editing">Save</button>
        <button mat-raised-button *ngIf="editing" (click)="onCancelClick()">Cancel</button>
    </div>
  </form>
</div>
